﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using iSun.Common;
using iSun.Model;


namespace iSun.SYS.Bussiness
{
    public class WorkFlowStartInfo : iSun.BLL.Base.BaseBussnies
    {
        public bool Start(string Entity, object KeyValue, string workflowid, string worktaskid, string workTaskInsId, string workFlowInsId)
        {
                this.entity = new DataTableBaseEntity();
                DataTableBaseEntity _entity = this.entity as DataTableBaseEntity;
                                _entity.TableName = Entity;
                string[] strArrary = _entity.GetKey();
                if (strArrary != null)
                {
                    _entity.TableKey = strArrary[0];
                    _entity.KeyType = strArrary[1];
                }

                _entity.CreateDT(KeyValue.ToString());
                _entity.DRow["WorkFlowId"] =workflowid;
                _entity.DRow["WorkTaskId"] = worktaskid;
                _entity.DRow["WorkTaskInsId"] = workTaskInsId;
                _entity.DRow["WorkFlowInsId"] = workFlowInsId;
                return this.Update();
        }
    }
}
